#include <stdio.h>

int main() {
    int targer, result, num1 = 1, num2 = 1;

    printf("Fibonacci sequence\n输入第几项：");
    scanf("%d", &targer);

    for (int i = 0; i < targer-2; ++i) {
        result = num1 + num2;
        num1 = num2;
        num2 = result;
    }
    if(targer == 1 || targer == 2)
        result = 1;
    printf("第%d项是%d\n", targer, result);

    return 0;
}